package com.orange.educms.controller;


import com.orange.commonutils.result.Result;
import com.orange.educms.entity.CrmBanner;
import com.orange.educms.service.CrmBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author orange
 * @since 2021-12-22
 */
@RestController
@CrossOrigin
@RequestMapping("/eduCms/banner")
public class CrmBannerController {

    @Autowired
    private CrmBannerService crmBannerService;

    //查询所有轮播图
    @GetMapping("/getAll")
    public Result getAll(){
        List<CrmBanner> list = crmBannerService.getAllBanner();
        return Result.ok().data("list",list);
    }
}

